#include "cpp_next.h"

int main() {
    Cpp_Next script;

    // 运行 Cpp_Next 示例程序
    script.run(R"(
        let x 10
        let y 20
        define add a b let result add a b result
        define multiply a b let result add a b result
        define map func ...args
            let results []
            for arg args
                let res call func arg
                let temp add results res
                let results temp
            results
        let sum call add x y
        print The sum of x and y is sum
        let product call multiply x y
        print The product of x and y is product
        define inc n let result add n 1 result
        let incrementedValues call map inc 1 2 3 4 5
        print Incremented values are incrementedValues
    )");

    return 0;
}

